package com.zatech.cgnci.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zatech.cgnci.project.base.utils.ConvertUtils;
import com.zatech.cgnci.project.entity.CgnciBillInfoDO;
import com.zatech.cgnci.project.mapper.CgnciBillInfoMapper;
import com.zatech.cgnci.project.service.CgnciBillInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zatech.cgnci.project.vo.CgnciBillInfoVO;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 账单信息表 服务实现类
 * </p>
 *
 * @author Generator
 * @since 2024-12-17
 */
@Service
public class CgnciBillInfoServiceImpl extends ServiceImpl<CgnciBillInfoMapper, CgnciBillInfoDO> implements CgnciBillInfoService {

    @Override
    public CgnciBillInfoVO getBillInfoByInsuranceId(Long insuranceId) {
        CgnciBillInfoDO billInfoDO = this.getOne(new LambdaQueryWrapper<CgnciBillInfoDO>().eq(CgnciBillInfoDO::getBusinessId, insuranceId));
        return ConvertUtils.convert(billInfoDO, CgnciBillInfoVO.class);
    }
}
